<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" href="http://7xkzac.com2.z0.glb.qiniucdn.com/fahailogo.png" type="image/x-icon"/>
    <title>场景及产品管理</title>

    <link rel="stylesheet" href="/assets/css/lib/bootstrap.min.css">
    <link rel="stylesheet" href="/assets/css/lib/pagination.css">

    <link rel="stylesheet" href="/assets/css/common.css">
    <link rel="stylesheet" href="/assets/css/management_list.css">

</head>

<body>
<div id="cms">
    <jsp:include page="title_bar.jsp"/>
    <jsp:include page="tab_bar.jsp"/>
    <div class="cms-content">
        <div class="current-place">
            <div class="place-title">当前位置:</div>
            <div class="place-val">首页/场景及卡券管理</div>
        </div>
        <div class="common-title set">
            <div class="common-text tab active" id="scenetab">场景设定</div>
            <div class="common-text tab " id="cardtab">充值卡券设定</div>
        </div>
        <div class="cms-container">
            <div class="slider-box">
                <div class="slider-container">
                    <div class="table-box slider-unit">
                        <div class="common-title">
                            <div class="common-left-line"></div>
                            <div class="common-text">场景设定</div>
                            <!if(role==0){!>
                            <div class="common-right-btn newadd1" name="roleMenu" onclick="scene_add_show()">新增</div>
                            <!}!>
                        </div>
                        <table class="table table-bordered">
                            <thead>
                            <tr>
                                <th>场景名称</th>
                                <th>场景ID</th>
                                <th>
                                    <select class="form-control client-status" id="cobject_select">
                                        <option value="">场景性质</option>
                                        <option value="1">商业</option>
                                        <option value="0">公益</option>
                                    </select>
                                </th>
                                <th>备注</th>
                                <th>修改</th>
                            </tr>
                            </thead>
                            <tbody id="tbody1">

                            </tbody>
                            <script id="listtmp1" type="text/html">
                                <!for(k in result){
                                var v=result[k];
                                !>
                                <tr>
                                    <td class="cname"><!=v.cname!></td>
                                    <td class="appid"><!=v.appid!></td>
                                    <td class="cobject"><!=v.cobject!></td>

                                    <td class="remark"><!=v.remark==null?'':v.remark!></td>
                                    <td class="operate">
                                        <!if(role==0){!>
                                        <div class="ud-btn modify-btn"
                                             data-value="<!=v.cname!>"
                                             id-value="<!=v.cid!>" onclick="scene_edit_show(this)"
                                        >编辑
                                        </div>
                                        <!}!>
                                    </td>
                                </tr>
                                <!}!>
                            </script>
                        </table>

                        <div class="table-bottom clearfix">
                            <div id="Pagination1" class="pagination"><!-- 这里显示分页--></div>
                        </div>
                    </div>

                    <div class="table-box slider-unit">
                        <div class="common-title">
                            <div class="common-left-line"></div>
                            <div class="common-text">充值卡券设定</div>
                            <div class="common-right-btn newadd2" name="roleMenu" onclick="card_add_show()">增加</div>
                        </div>
                        <table class="table table-bordered">
                            <thead>
                            <tr>
                                <th></th>
                                <th>
                                    <div>卡券分类</div>
                                    <select class="form-control client-status" id="tctype_select">
                                        <option value="">全部</option>
                                        <option value="1">通用计次卡F</option>
                                        <option value="2">专用计次卡F</option>
                                        <option value="3">通用充值卡S</option>
                                        <option value="4">专用计次卡S</option>
                                    </select>
                                </th>
                                <th>卡券名称</th>
                                <th>卡券SN</th>
                                <th>渠道SN</th>
                                <th class="create-time sequence" pxzd="tcStarTime">
                                    <span>起始效期</span>
                                    <img src="/assets/images/up.png" class="up">
                                    <img src="/assets/images/down.png" class="down">
                                    <img src="/assets/images/default_status.png" class="default">
                                </th>
                                <th class="first-consult-time sequence" pxzd="tcEndTime">
                                    <span>结束效期</span>
                                    <img src="/assets/images/up.png" class="up">
                                    <img src="/assets/images/down.png" class="down">
                                    <img src="/assets/images/default_status.png" class="default">

                                </th>
                                <th>面值/次</th>
                                <th>定价</th>
                                <th>发行方</th>
                                <th>发行量（张）</th>
                                <th>已用量（张）</th>
                                <th>
                                    <span>上架状态</span>
                                    <select class="form-control client-status" id="tcisopen_select">
                                        <option value="">全部</option>
                                        <option value="1">在售</option>
                                        <option value="0">停售</option>
                                    </select>
                                </th>
                                <th>备注</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody id="tbody2">

                            </tbody>
                            <script id="listtmp2" type="text/html">
                                <!for(k in result){
                                var v=result[k];
                                !>
                                <tr>
                                    <td><input type="checkbox" class="check-unit"/></td>
                                    <td class="tctypestr"><!=v.tctypestr!></td>
                                    <td class="tctype" style="display: none;"><!=v.tctype!></td>
                                    <td class="proid" style="display: none;"><!=v.proid!></td>
                                    <td class="tcName"><!=v.tcName!></td>
                                    <td class="tcSn"><!=v.tcSn.split('-')[0]!></td>
                                    <td class="bak"><!=v.tcSn.split('-')[1]!></td>
                                    <td class="tcStarTime" style='display:none' ><!=v.tcStarTime!></td>
                                    <td class="tcEndTime" style='display:none'   >
                                        <!=v.tcEndTime!>
                                    </td>
                                    <td class="tcStarTimeStr" ><!=v.tcStarTimeStr!></td>
                                    <td class="tcEndTimeStr" ><!=v.tcEndTimeStr!></td>
                                    <td class="freeTime"><!= v.freeTime ==null?'':v.freeTime!></td>
                                    <td class="callPrice"><!= v.callPrice  ==null?'':v.callPrice!></td>
                                    <td class="tcPublish"><!=v.tcPublish ==null?'':v.tcPublish!></td>
                                    <td class="publishNum"><!=v.publishNum ==null?'':v.publishNum!></td>
                                    <td class="publishUnum"><!=v.publishUnum ==null?'':v.publishUnum!></td>
                                    <td class="tcisopen"><!=v.tcisopen!></td>
                                    <td class="tcRemark"><!=v.tcRemark!></td>
                                    <td class="tcid" style='display:none'><!=v.tcid!></td>
                                    <td class="tcTag" style='display:none'><!=v.tcTag!></td>
                                    <td class="lawyername" style='display:none'><!=v.lawyername!></td>
                                    <td class="lawyerPhone" style='display:none'><!=v.lawyerPhone!></td>
                                    <td class="operate">
                                        <!if(role==0){!>
                                        <div class="ud-btn modify-btn"
                                             data-value="<!=v.tcName!>"
                                             id-value="<!=v.tcid!>" onclick="card_edit_show(this)"
                                        >编辑<span><!=v.proid!></span>
                                        </div>
                                        <!}!>
                                    </td>
                                </tr>
                                <!}!>
                            </script>
                        </table>

                        <div class="table-bottom clearfix">
                            <div class="check-all">
                                <input type="checkbox" id="check-all">
                                <label for="check-all" style="font-weight: normal;">全选</label>
                            </div>
                            <div class="freeze" name="roleMenu">批量上架(在售)</div>
                            <div class="unfreeze" name="roleMenu">批量下架(停售)</div>
                            <div id="Pagination2" class="pagination"><!-- 这里显示分页--></div>
                        </div>
                    </div>


                </div>
            </div>
        </div>
    </div>
</div>
<div class="cms-modal-lg" id='edit-materiala'>
    <div class="cms-modal-dialog">
        <div class="cms-modal-title">修改场景信息</div>
        <div class="cms-madal-content">
            <div class="state-unit">
                <div class="two-stage">
                    <div class="state-left">
                        卡券名称
                        <input type="text" name="" value="" class="padding-span form-control" id="cname_edit"
                               maxlength="30">
                        <input type="text" name="" value="" style="display: none" id="cid_edit">
                    </div>
                    <div class="state-right">
                         场景ID
                        <input type="text" name="" value=""   id="appid_edit" disabled="true">
                    </div>
                </div>
            </div>
            <div class="state-unit">
                <div class="two-stage">
                    <div class="state-left">
                        场景性质
                        <select class="selectcj form-control" id="cobject_edit">
                            <option value="0">公益</option>
                            <option value="1">商用</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="two-stage">
                <div class="state-left">
                    <span>备注</span>
                </div>
            </div>
            <textarea placeholder="请输入备注" class="common-remark" id="remark_edit" maxlength="200"></textarea>
            <div class="limit200">限200字</div>
        </div>
        <div class="cms-modal-bottom">
            <button type="button" class="cms-confirm edit-confirm" onclick="scene_edit_confirm()">确定</button>
            <button type="button" class="cms-cancel edit-cancel" onclick="hideDialog()">取消</button>
        </div>
    </div>
</div>

<div class="cms-modal-lg" id='edit-materialc'>
    <div class="cms-modal-dialog">
        <div class="cms-modal-title">新增场景信息</div>
        <div class="cms-madal-content">
            <div class="state-unit">
                <div class="two-stage">
                    <div class="state-left">
                        场景名称
                        <input type="text" name="" value="" class="padding-span form-control" id="cname_add">
                    </div>
                    <div class="state-right">
                         场景ID
                        <input type="text" name="" value=""   id="appid_add">
                    </div>
                </div>
            </div>
            <div class="state-unit">
                <div class="two-stage">
                    <div class="state-left">
                        场景性质
                        <select class="selectcj form-control" id="cobject_add">
                            <option value="0">公益</option>
                            <option value="1">商用</option>
                        </select>
                    </div>
                </div>
            </div>

            <div class="two-stage">
                <div class="state-left">
                    <span>备注</span>
                </div>
            </div>
            <textarea placeholder="请输入备注" class="common-remark" id="remark_add"></textarea>
            <div class="limit200">限200字</div>
        </div>
        <div class="cms-modal-bottom">
            <button type="button" class="cms-confirm edit-confirm" onclick="scene_add_confirm()">确定</button>
            <button type="button" class="cms-cancel edit-cancel" onclick="hideDialog()">取消</button>
        </div>
    </div>
</div>

<div class="cms-modal-ms" id="freeze-info">
    <div class="cms-modal-dialog">
        <div class="cms-modal-title">操作提醒</div>
        <div class="cms-madal-content">
            <div class="freeze-quesition">确定讲选中的商品上架么？</div>
            <div class="freeze-info">上架之后。。。。。。。</div>
        </div>
        <div class="cms-modal-bottom">
            <button type="button" class="cms-confirm freeze-confirm">确定</button>
            <button type="button" class="cms-cancel freeze-cancel">取消</button>
        </div>
    </div>
</div>

<div class="cms-modal-lg" id='edit-materialb'>
    <div class="cms-modal-dialog" id="addDialog_card_edit">
        <div class="cms-modal-title">编辑商品</div>
        <div class="cms-madal-content">
            <div class="state-unit">
                <div class="two-stage">
                    <div style="display: none">
                        <input type="text" name="tcid" id="tcid_edit"><input type="text" name="zdlscode">
                    </div>
                    <div class="state-left">
                        产品名称
                        <select class="proid" name="proid" id="proid_edit" readonly >
                        </select>(请勿随意选择，提交后不能再修改)
                        <br>
                    </div>
                    <div class="state-left">
                        卡券名称
                        <input type="text" name="tcName" id="tcName_edit" value="" class="padding-span"  >
                    </div>
                    <div class="state-right">
                        <span>卡券分类</span>
                        <select class="classification" name="tctype" id="tctype_edit" style="width: 200px; background-color: #EEEEEE;" disabled="disabled" onchange="classification_chg(this)" >
                            <option value="1">通用计次卡F</option>
                            <option value="2">专用计次卡F</option>
                            <option value="3">通用充值卡S</option>
                            <option value="4">专用计次卡S</option>
                        </select>
                        卡券SN<input type=text name="tcSn"  id="tcSn_edit" class="min-input"  readonly >
                    </div>
                </div>
            </div>
            <div class="state-unit">
                <div class="two-stage">
                    <div class="state-left">
                        <span>定价</span>
                        <input   name="callPrice" value=""  id="callPrice_edit" class="min-input padding-span" type="text"  onkeyup="checknum(this)" readonly  >
                        <span>发行量</span>
                        <input type="text" name="publishNum" id="publishNum_edit" value="" class="min-input" maxlength="4" digits="true" readonly>
                        <span class="padding-span">张</span>
                        <span>渠道SN</span>
                        <input type="text" name="bak" value="" id="bak_edit" class="min-input " maxlength="3" readonly >
                    </div>
                </div>
            </div>
            <div class="state-unit">
                <div class="two-stage">
                    <div class="state-left">
                        <span>发行方</span>
                        <select class="padding-span drop_down" name="tcPublish" id="tcPublish_s"  disabled="true" onchange="publish_chg(obj)">
                            <option value="0">法海</option>
                            <option value="1">律师</option>
                        </select>
                    </div>
                    <div class="state-right">
                        <span class="type_mz">次数</span>
                        <input type="text" name="freeTime" value=""  id="freeTime_edit" class="min-input " maxlength="20"  disabled="true">
                        <span class="company">次</span>
                    </div>
                    <div class="state-right">
                        <span class="tcTag">标签</span>
                        <input type="text" name="tcTag"  id="tcTag_edit" value="" class="min-input " maxlength="20" disabled="true">
                    </div>
                </div>
                <div class="two-stage selected_box">
                    <!--法海-->
                </div>
                <div class="two-stage selected_box">
                    <!-- 律师 -->
                    <div class="state-left">
                        <span>律师姓名</span>
                        <input type="text" name="lawyername" id="lawyername_edit" value="" class="padding-span" maxlength="20" disabled="true">
                    </div>
                    <div class="state-right">
                        <span>律师手机号</span>
                        <input type="text" name="lawyerPhone" id="lawyerPhone_edit" value="" maxlength="11" disabled="true">
                    </div>
                </div>

            </div>
            <div class="state-unit">
                <div class="two-stage">
                    <div class="state-left">
                        <span>有效期</span>
                        <input type="text" class="Wdate " id="first-consult-start" name="tcStarTime" disabled="true"/>
                        <span>-</span>
                        <input type="text" class="Wdate " id="first-consult-end" name="tcEndTime"  disabled="true"/>
                    </div>
                </div>
            </div>
            <div class="state-unit">
                <div class="two-stage">
                    <div class="state-left">
                        <span>备注</span>
                    </div>
                </div>
                <textarea placeholder="请输入备注" class="common-remark" id="tcRemark_edit" name="tcRemark" maxlength="200" ></textarea>
                <div class="limit200">限200字</div>
            </div>
        </div>
        <div class="cms-modal-bottom">
            <button type="button" class="cms-confirm edit-confirm" id="cardsave" onclick="confirm_card_update()">确定
            </button>
            <button type="button" class="cms-cancel edit-cancel" onclick="hideDialog()">取消</button>
        </div>
    </div>
</div>
<div class="cms-modal-lg" id='edit-materiald'>
    <div class="cms-modal-dialog" id="addDialog_card">
        <div class="cms-modal-title">新增商品</div>
        <div class="cms-madal-content">
            <div class="state-unit">
                <div class="two-stage">
                    <div style="display: none">
                        <input type="text" name="tcid"><input type="text" name="zdlscode">
                    </div>
                    <div class="state-left">
                        产品名称
                        <select class="proid" name="proid" id="proid_add"  >
                        </select>(请勿随意选择，提交后不能再修改)
                            <br>
                    </div>
                    <div class="state-left">
                        卡券名称
                        <input type="text" name="tcName" value="" class="padding-span">
                    </div>
                    <div class="state-right">
                        卡券分类
                        <select class="classification" name="tctype" id="tctype_add" onchange="classification_chg(this)">
                            <option value="1">通用计次卡F</option>
                            <option value="2">专用计次卡F</option>
                            <option value="3">通用充值卡S</option>
                            <option value="4">专用计次卡S</option>
                        </select>
                        卡券SN <input name="tcSn" type="text" id="tcSn_add" class="min-input"  required="true">
                    </div>
                </div>
            </div>
            <div class="state-unit">
                <div class="two-stage">
                    <div class="state-left">
                        <span>定价</span>
                        <input type="text" name="callPrice" value="" class="min-input padding-span" step="0.01" onkeyup="checknum(this)">
                        <span>发行量</span>
                        <input type="text" name="publishNum" value="" class="min-input">
                        <span class="padding-span">张</span>
                        <span>渠道SN</span>
                        <input type="text" name="bak" value="" class="min-input "  required="true">
                    </div>
                </div>
            </div>
            <div class="state-unit">
                <div class="two-stage">
                    <div class="state-left">
                        <span>发行方</span>
                        <select class="padding-span drop_down" name="tcPublish" id="tcPublish_add" onchange="publish_chg(this)">
                            <option value="0">法海</option>
                            <option value="1">律师</option>
                        </select>
                    </div>
                    <div class="state-right">
                        <span class="type_mz">次数</span>
                        <input type="text" name="freeTime" value="" class="min-input " digits="true"  >
                        <span class="company">次</span>
                    </div>
                    <div class="state-right">
                        <span class="tcTag">标签</span>
                        <input type="text" name="tcTag" value="" class="min-input " maxlength="20">
                    </div>
                </div>
                <div class="two-stage selected_box2">
                    <!--法海-->
                </div>
                <div class="two-stage selected_box2">
                    <!-- 律师 -->
                    <div class="state-left">
                        <span>律师姓名</span>
                        <input type="text" name="lawyername" value="" class="padding-span" maxlength="20">
                    </div>
                    <div class="state-right">
                        <span>律师手机号</span>
                        <input type="text" name="lawyerPhone" value="" maxlength="11">
                    </div>
                </div>

            </div>
            <div class="state-unit">
                <div class="two-stage">
                    <div class="state-left">
                        <span>有效期</span>
                        <input type="text" class="Wdate " id="first-consult-start2" name="tcStarTime"/>
                        <span>-</span>
                        <input type="text" class="Wdate " id="first-consult-end2" name="tcEndTime"/>
                    </div>
                </div>
            </div>
            <div class="state-unit">
                <div class="two-stage">
                    <div class="state-left">
                        <span>备注</span>
                    </div>
                </div>
                <textarea placeholder="请输入备注" class="common-remark" name="tcRemark" maxlength="200"></textarea>
                <div class="limit200">限200字</div>
            </div>
        </div>
        <div class="cms-modal-bottom">
            <button type="button" class="cms-confirm edit-confirm" onclick="confirm_card_add()">确定</button>
            <button type="button" class="cms-cancel edit-cancel" onclick="hideDialog()">取消</button>
        </div>
    </div>
</div>
</body>
<script type="text/javascript" src="/assets/js/lib/jquery-1.12.3.js"></script>
<script type="text/javascript" src="/assets/js/lib/bootstrap.min.js"></script>
<script type="text/javascript" src="/assets/js/lib/modal.js"></script>
<script type="text/javascript" src="/assets/js/lib/cmsmodal.js"></script>

<script type="text/javascript" src="/assets/js/lib/distpicker.data.js"></script>
<script type="text/javascript" src="/assets/js/lib/distpicker.js"></script>
<script type="text/javascript" src="/assets/js/lib/jquery.pagination.js"></script>

<script type="text/javascript" src="/assets/js/lib/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/assets/js/common.js"></script>
<script type="text/javascript" src="/assets/js/communal/template.js"></script>
<script type="text/javascript" src="/assets/js/management_list.js"></script>

</html>
